Subject: [Oauth 2.0] imap Office 365
Date: 2022-08-12 13:32:28
From: Sébastien
Source: [oauth-2-0]-imap-office-365-3499d2cc-ef55-43e0-b0f3-e7b515e170f0
----------------------------------------------------------------------

Hi Martin,

I'm trying to authenticate on microsoft office 365 using Oauth 2.0. I always have the following error with the dll : "AUTHENTICATE failed (NO)." My Azure App, and my token are OK, **i can authenticate using another librairy** (MailKit).

My app ressources are :

![enter image description here][1]

And the token is :

![enter image description here][2]

the scope seems to be OK, and I use directly the acces_token to authenticate, but unsuccessfull


  [1]: https://download.isi-com.com/tmp/api.png
  [2]: https://download.isi-com.com/tmp/token.png

My code :

                using (Imap _imap = new Imap())
                {
                    _imap.Connect("outlook.office365.com", 993, ComponentPro.Net.SslSecurityMode.Implicit);

                    _imap.Authenticate(_return.access_token.Value, ImapAuthenticationMethod.OAuth20);

                    _imap.Disconnect();
                }

Could you help me ?

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index